﻿using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class UICtrl : MonoBehaviour
{
    public static UICtrl Instance;
    [SerializeField]
    private RectTransform transUIRoot;

    private FightUIPanel _uiPanel;
    public Camera uiCamera;
    private void Awake()
    {
        Instance = this;
        DontDestroyOnLoad(this.gameObject);
    }

    private void Start()
    {
        string path = "GUI/Prefabs/FightUI";
        GameObject uiGob = AssetManager.Instance.LoadAndInstantiatePrefab(path);
        uiGob.transform.SetParent(transUIRoot, false);
        uiGob.transform.localPosition = Vector3.zero;
        _uiPanel = uiGob.GetComponent<FightUIPanel>();
    }
}
